package com.runfast.waimai.service;

import com.runfast.common.service.IService;
import com.runfast.paotui.dao.model.Order;
import com.runfast.waimai.dao.model.RunfastGoodsSellRecord;
import com.runfast.waimai.dao.model.RunfastGoodsSellRecordExample;
import com.runfast.waimai.util.PageBean;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface RunfastGoodsSellRecordService extends IService<RunfastGoodsSellRecord, Integer, RunfastGoodsSellRecordExample> {
    Integer  findBookTimecount(Integer shopperid,Date bookTime,Integer agentid);
    List<RunfastGoodsSellRecord> findByShopperAndSize( Integer shopperid);
    Integer findByShopperIdAndStrutscount(Integer shopperid,  Integer status);
    List<RunfastGoodsSellRecord> findByShopperIdAndStruts(Integer shopperid,  Integer status,Integer page,Integer pagesize);
    List<RunfastGoodsSellRecord> findByShopperIdAndStrutsAndagree1(Integer shopperid,  Integer status);
    List<RunfastGoodsSellRecord> findByShopperIdAndStrutsAndagree2(Integer shopperid,  Integer status);
    public RunfastGoodsSellRecord findByShopperIdAndId(Integer shopperid,Integer id);

    RunfastGoodsSellRecord findByShopperIdAndOrderCode( Integer shopperid,  Integer id);
    RunfastGoodsSellRecord findByShopperIdAndOrderCode1( Integer shopperid,  String orderCode);

    List<RunfastGoodsSellRecord> findById(Integer shopperid);
    RunfastGoodsSellRecord get(Integer id);


    PageBean<RunfastGoodsSellRecord> getPageBean4Driver(Integer pageSize,  Integer page, Integer status,  Integer shopperId, Integer agentid, Integer teamid);

    void update(RunfastGoodsSellRecord record);

    List<RunfastGoodsSellRecord> findBymonth(Integer id, Date createTime,Date createTime1);

   List< RunfastGoodsSellRecord> findBytime(Date parse, Date parse1, Integer id, int page, int rows, Integer agentid);
   // List<RunfastGoodsSellRecord> getInfo(Integer id);
    List<RunfastGoodsSellRecord> findListPageBean( Integer pageSize, Integer page,  Integer status,  Integer shopperId,  Integer agentid,  Integer teamid);
    Integer findCount( Integer pageSize, Integer page,  Integer status,  Integer shopperId, Integer agentid,  Integer teamid);

  List<Map<String,String>> findByAgentnameAndbusinessnameAndTime(Integer agentid, String name, Date date1, Date date2,Integer isdelive);

    List<Map<String,String>> findAgentnameMoney(Date createtime1, Date createatime2,Integer isdeliver);

    List<Map<String,BigDecimal>> findshopperAndCityAndtime(String cityname, String shoppername, Date ceateatime1, Date ceateatime2, Integer page,Integer pagesize);

    int findByShopperIdOrderCodeCount(Integer shopperid);

    int findCountShopperOrder(Integer shopperid);

    int findCountStatus9(Integer shopperid);


    List<RunfastGoodsSellRecord> findaftertime(Date date1, Date date2, String cityname, String shoppername);

    List<RunfastGoodsSellRecord> finderrorOver(Date date1, Date date2, String cityname, String shoppername);
    List<RunfastGoodsSellRecord> findlastscore(Date date1, Date date2, String cityname, String shoppername);
    List<RunfastGoodsSellRecord> findToday(Integer id, Date date1,Date date2);

    List<RunfastGoodsSellRecord> findstatus(Integer  status,Integer page,Integer pagesize,Integer agentid,Integer shopperId,Date date);
    Integer findstatuscount(Integer  status,Integer page,Integer pagesize,Integer agentid,Integer shopperid,Date date);
    Integer findstatuscount1(Integer  status, Integer agentid);

    List<RunfastGoodsSellRecord> findBookTime(Integer shopperid,Date bookTime,Integer agentid);

    RunfastGoodsSellRecord findByOrderCodeid(Integer orderid);
    RunfastGoodsSellRecord findByOrderCode(String orderCode);
    List<RunfastGoodsSellRecord> findAllAndTime(Integer id,Integer page, Integer pagesize, Date time1, Date time2);
    Integer findAllAndTimecount(Integer id,Integer page, Integer pagesize, Date time1, Date time2);

    Integer findNameAndCount(Integer shopperid, Integer page, Integer pagesize, Date time1, Date time2,String businessName);

    List<RunfastGoodsSellRecord> findstatusnewmsg( Integer page, Integer pageSize, Integer agentid);
    Integer findstatusnewmsgcount( Integer page, Integer pageSize, Integer agentid);

    List<Map<String,String>> findcommisson(Integer shopperid,Date date1,Date date2);

    Integer findcommissoncount(Integer shopperid, Date time1, Date time2);

    List<Map<String,String>> findcommisson7(Integer shopperid);

    List<Map<String,String>> findcommisson8(Integer shopperid);

    RunfastGoodsSellRecord get1(Integer id);

    List<RunfastGoodsSellRecord> findByShopperIdAndStrutsSize(Integer shopperid);

    Integer findShopperAndStatusErroCount(Integer shopperid);
}